
@extends('admin.layout.layout')


@section('content')   
<div class="row">
<div class="col-lg-12">
    <h1 class="page-header">友链添加</h1>
</div>
<!-- /.col-lg-12 -->
</div>


<!--                 友链添加列表                                   -->
<div class="row">
<div class="col-lg-12">
    <div class="panel panel-default">
        <div class="panel-heading">
            添加友链
        </div>
        <div class="panel-body">
            <div class="row">
         
                <div class="col-lg-6 col-lg-offset-3">
                  
                 
                  @if (count($errors) > 0)
                        <div class="alert alert-danger">
                            <ul>
                                @foreach ($errors->all() as $error)
                                    <li>{{ $error }}</li>
                                @endforeach
                            </ul>
                        </div>
                    @endif
                


                    <form role="form"  action="{{url('/admin/frilk/insert')}}" method="post" enctype="multipart/form-data">
                 
                                <div class="form-group">
                                    <label>友链关键词</label>
                                    <input class="form-control" name="flkws"  type="text" value="{{old('flkws')}}"> 
                                </div>
                                <div class="form-group">
                                    <label>友链网址</label>
                                    <input class="form-control" name="flurl" type="text"  value="{{old('flurl')}}">
                                </div>
                             
                                <div class="form-group">
                                    <label>友链图片</label>
                                    <input type="file"  name="flpic">
                                </div>
                                
                                  
                                <div class="form-group">
                                    <label>友链描述</label>
                                   <script id="editor" type="text/plain" style="width:450px;height:250px;"></script>
                                </div>
                            {{csrf_field()}}
								
                                <button type="submit" class="btn btn-primary btn-lg btn-block">添加提交</button>
                        
                      
                    </form> 
					
                </div>

                <!-- /.col-lg-6 (nested) -->
            </div>
            <!-- /.row (nested) -->
        </div>
        <!-- /.panel-body -->
    </div>
    <!-- /.panel -->
</div>
<!-- /.col-lg-12 -->
</div>
    @section('myjs')
    <script type="text/javascript" charset="utf-8" src="/public/baidu/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/public/baidu/ueditor.all.min.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="/public/baidu/lang/zh-cn/zh-cn.js"></script>
    <script type="text/javascript">
    //实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    var ue = UE.getEditor('editor',{
    toolbars: [
    ['fullscreen', 'source', 'undo', 'redo'],
    ['bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc','simpleupload', 'insertimage',  'edittable', 'edittd',  'link',  'emotion',  'spechars', 'searchreplace',  'map', 'gmap', 'insertvideo']
]
    });
</script>
    @endsection
@endsection